package com.example.demo.service.impl;

import com.example.demo.entity.Food;
import com.example.demo.mapper.FoodMapper;
import com.example.demo.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FoodServiceImpl implements FoodService {
    @Autowired
    private FoodMapper foodMapper;

    @Override
    public List<Food> findFood() {
        return foodMapper.findFood();
    }

    @Override
    public List<Food> findToLike(String fname) {
        return foodMapper.findToLike(fname);
    }

    @Override
    public int addFood(Map<String, String> map) {
        return foodMapper.addFood(map);
    }

    @Override
    public int updateFood(Map<String, String> map) {
        return foodMapper.updateFood(map);
    }

    @Override
    public int delFood(Integer fid) {
        return foodMapper.delFood(fid);
    }
}
